
package com.qdu.main;

import com.qdu.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainClass {
    
    //public static void main
    //psvm->tab
    public static void main(String[] args) {
        ApplicationContext ctx=new ClassPathXmlApplicationContext("beans.xml");
        UserDao dao=(UserDao)ctx.getBean("userDao");
        //调用主要业务逻辑代码
        dao.add();
        dao.update();
        dao.delete();
        dao.getUser(9);
        dao.getAll();
        
    }
}
